<?php
  include_once 'global.php';
  
  //================
  
  if(!empty($_GET['id'])){
	$sql="SELECT * FROM `n_newsbase` as a, `n_newscontent` as b WHERE a.id=b.nid and a.id='$_GET[id]'";
    $query = $db->query($sql);
    $row_news = $db->fetch_array($query);
    print_r($row_news);
  }
  
  $smarty->assign("row_news",$row_news);
  $smarty->display("view.html");
?>